package com.realestate.model;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;
import java.util.Set;


/**
 * The persistent class for the brtb_product database table.
 * 
 */
@Entity
@Table(name="brtb_product")
public class BrtbProduct implements Serializable {
	private static final long serialVersionUID = 1L;

	private long id;

	private Long categoryId;

	private String description;

	private Date makeDate;

	private String productCode;

	private String productName;

	private String recordStatus;

	private BrtbCategory brtbCategory;

	private Set<BrtbProductAttributeValue> brtbProductAttributeValues;

	private Set<BrtbProductCommonAttrValue> brtbProductCommonAttrValues;

    public BrtbProduct() {
    }

    @Id
	@SequenceGenerator(name="BRSQ_PRODUCT" )
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="BRSQ_PRODUCT")
	public long getId() {
		return this.id;
	}

	public void setId(long id) {
		this.id = id;
	}

	@Column(name="category_id")
	public Long getCategoryId() {
		return this.categoryId;
	}

	public void setCategoryId(Long categoryId) {
		this.categoryId = categoryId;
	}

	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Temporal( TemporalType.TIME)
	@Column(name="make_date")
	public Date getMakeDate() {
		return this.makeDate;
	}

	public void setMakeDate(Date makeDate) {
		this.makeDate = makeDate;
	}

	@Column(name="product_code")
	public String getProductCode() {
		return this.productCode;
	}

	public void setProductCode(String productCode) {
		this.productCode = productCode;
	}

	@Column(name="product_name")
	public String getProductName() {
		return this.productName;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}

	@Column(name="record_status")
	public String getRecordStatus() {
		return this.recordStatus;
	}

	public void setRecordStatus(String recordStatus) {
		this.recordStatus = recordStatus;
	}

	@OneToOne
	@JoinColumn(name="id")
	public BrtbCategory getBrtbCategory() {
		return this.brtbCategory;
	}

	public void setBrtbCategory(BrtbCategory brtbCategory) {
		this.brtbCategory = brtbCategory;
	}
	
	@OneToMany(mappedBy="brtbProduct")
	public Set<BrtbProductAttributeValue> getBrtbProductAttributeValues() {
		return this.brtbProductAttributeValues;
	}

	public void setBrtbProductAttributeValues(Set<BrtbProductAttributeValue> brtbProductAttributeValues) {
		this.brtbProductAttributeValues = brtbProductAttributeValues;
	}
	
	@OneToMany(mappedBy="brtbProduct")
	public Set<BrtbProductCommonAttrValue> getBrtbProductCommonAttrValues() {
		return this.brtbProductCommonAttrValues;
	}

	public void setBrtbProductCommonAttrValues(Set<BrtbProductCommonAttrValue> brtbProductCommonAttrValues) {
		this.brtbProductCommonAttrValues = brtbProductCommonAttrValues;
	}
	
}